# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=gnomon
pkgver=1.5.0
pkgrel=3
pkgdesc="Utility to annotate console logging statements with timestamps and find slow processes"
arch=('any')
url="https://github.com/paypal/gnomon"
license=('MIT')
depends=('nodejs' 'semver')
makedepends=('npm')
source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
noextract=($pkgname-$pkgver.tgz)
sha512sums=('0c199bada9e7588896206b2e075d18542ce10a77b229465a021a93731e3afd00380771bb02b5331c5048f3b6029642d6ada180a26c47b7bc0d10ab2719de9c95')

package() {
  npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz

  # Experimental dedup
  rm -r "$pkgdir"/usr/lib/node_modules/$pkgname/node_modules/semver

  # npm gives ownership of ALL FILES to build user
  chown -R root:root "${pkgdir}"
}

# vim:set ts=2 sw=2 et:
